type int = number;
//class ImageNum
    
    export  class ImageNum /* flash.display.Sprite */
    {
        constructor()
        {
            
            this._bitmapArray = [];
            return;
        }

        public set numBmdArray(arg1: Array<any>)
        {
            this._numBmdArray = arg1;
            return;
        }

        public updateNum(arg1: int): void
        {
            var loc1=null;
            var loc4=0;
            this._numArray = [];
            this._len = arg1.toString().length;
            var loc2=arg1;
            var loc3=(this._len - 1);
            var loc5=0;
            while (loc5 < this._len) 
            {
                if (loc2 % Math.pow(10, loc3) == 0) 
                {
                    loc4 = loc2 / Math.pow(10, loc3);
                }
                else 
                {
                    loc4 = int(loc2 / Math.pow(10, loc3));
                }
                this._numArray.push(loc4);
                loc2 = loc2 % Math.pow(10, loc3);
                --loc3;
                ++loc5;
            }
            this.updateBitmap();
            return;
        }

        /* internal  */updateBitmap(): void
        {
            var loc1=null;
            var loc2=0;
            var loc3=0;
            this.clear();
            loc3 = 0;
            while (loc3 < this._len) 
            {
                loc1 = this._bitmapArray[loc3];
                if (loc1 == null) 
                {
                    loc1 = new Object /* flash.display.Bitmap */();
                    this._bitmapArray[loc3] = loc1;
                }
                loc2 = this._numArray[loc3] as int;
                loc1.bitmapData = this._numBmdArray[loc2] as Object /* flash.display.BitmapData */;
                loc1.x = loc3 * 30;
                this.addChild(loc1);
                ++loc3;
            }
            return;
        }

        /* internal  */clear(): void
        {
            var loc1=null;
            var loc2=0;
            while (loc2 < this.numChildren) 
            {
                loc1 = this.getChildAt(loc2) as Object /* flash.display.Bitmap */;
                if (loc1) 
                {
                    this.removeChild(loc1);
                }
                ++loc2;
            }
            return;
        }

        /* internal */ /* var */_numBmdArray: Array<any>;

        /* internal */ /* var */_bitmapArray: Array<any>;

        /* internal */ /* var */_numArray: Array<any>;

        /* internal */ /* var */_len: int;
    }
